Saturday, July 7, 2007

Page 27: Oh, the Irony in this Page.

The irony, of course, is in (temporarily) letting my Dad handle updates.

Okay, in fairness, as much as I represent myself through Jigsaw as a 'fursona' or avatar or whatever the hip new word is, Cypress is the one modeled off me more in terms of my personality. That said, I sorta see the relationship between Cypress and Vince as being two parts what I'm like with my Dad, and one part what the McMahons must feel like.

That sums up this current storyline, and next week I'll need to entrust my Dad with the next part... which we can only hope goes up without a hitch. No, he won't be updating the blog, but seeing how I'm having to dumb down the update process for him as is, that may be a minor blessing. Attempting to teach him went something like this:
"Okay, so we open these php files in notepad -- you'll need to tell the file viewer to show you 'all files', 'cause it treats php files weird for some reason -- and edit here, here, and here, and then you open winSCP, go to this directory-."

"... can you just put some premade files in a special directory so I can just go to that week and upload it instead?"
. . . I know my Dad's supersmart and everything, but really, when it comes to interfaces, you guys are spoiled rotten. Spoiled, I tell you.

Labels: ,

Wednesday, June 13, 2007

Standing Out by Blending In

This ties back to the Lazy Hacker approach: looking for a method of 'least resistance' in order to get exactly what you want. Fortunately, the Lazy Hacker approach also lends itself to a great trick when it comes to getting noticed; by only altering the cosmetic elements of what's involved, viewers get a whole new experience even if it's the exact same everything else under the hood.

To wit: This blog is being created thanks to Blogger, and as such I grabbed one of the first templates I could think of. Actually, I ended up grabbing 'Rounders' instead because it was more grok-able than the first one I picked up.



I shouldn't have to go too far in explaining why this simply wasn't good enough for my tastes. It's a perfectly fine layout, yes, and it has nice rounded edges, which looks better than sharp corners. But the colors are all wrong (despite the header being a nice red), and if I wanted to change any of the colors, I couldn't deviate far from the presets without the corner images themselves clashing. Furthermore . . . it looked obvious it was a Blogger page. Regardless of what my readers might 'think of me' for using it, leaving it in a default setting didn't make any sense at all when it was completely different from my comic site's layout. If nothing else, it had to look like the two pages went together.

To Fix: One of the few saving graces of the fact I'd picked up an otherwise unsuitable template was that (as I mentioned) the code was quite clean in comparison to some of the other templates, and I had a general idea that the main fixes I needed to do were mostly image-based; in other words, I needed to find the image URL references in the template given, and replace them with a few of my own. To keep the amount of necessary work to a minimum, I would often reference the template images given to make sure I was on the right track with sizes and general image/page anatomy involved.


The main issue with this approach was that the template was designed to work with the specific images it had, and so where mine deviated, I had to adjust the code to make them fit. Typically this involved altering the 'padding' of the given sections and constantly hitting the 'Preview' button on the template each time I made even minor changes to see what effect I had.
Obsessive, perhaps, but it worked.

Wherever something didn't fit in with the new scheme, it was "commented out" of the HTML coding, just in case I realized I wanted it for later (which is where that ugly text that was replaced by the new banner image went) . For the most part though, the actual layout of the page went untouched — the profile box barely looks different at all, although that's more by coincidence than anything else. The color DID change slightly to match the banner's edge, but that's about it.

The end goal was achieved in only a few hours' time though: We've broken free of the Blogger default, and made it look like it actually belongs to the domain. We even managed to use the favicon to replace the arrows in the bullets, adding to the design reinforcement. It's not a completed change-over, but it's sufficient enough that it's worth leaving it alone for now to see how well it actually works.

Labels: , , , ,

Tuesday, June 12, 2007

Five Secrets of the Lazy Hacker

Most of us know what a hacker 'is', or at least think we do; the image of some sweaty nerd who is anything but a healthy weight banging away at the keyboard and doing God-knows-what to our computers. Really, it's just someone who is so damned determined to get Result A that they're willing to do Task B, even if it means voiding a warranty or rooting around in the binaries to find out how to do it. Since at least some of making a webcomic means controlling the webpage it's viewed on, learning to be a Lazy Hack can be quite useful:

Lazy Hacker Secret #1: Never code for yourself what someone else has already put out on the Internet.
We don't mean theft, either. If you want to find a way to put Twitter into an image so you can have it in your forum sigs, guess what: Someone at TwitterSig already did it for you, albeit you might not like the image. Likewise, using templates for MySpace, Blogger, and other paste-and-bakes is already quite possible, and so it shouldn't be an issue to find one (or better yet, find one you can customize).

If you can only find close-but-not-quite what you want...

Lazy Hacker Secret #2: Grok the Code that's already There.
You should know what clean, commented-out code looks like when you see it, because it actually makes SENSE to read it. If you're not working from code that's already pristine, make it pristine. Tabbing-in nested portions and spacing out your work isn't just nice to read, it's essential to learning anything. Lazy Coders don't make their code easy to read because they don't want you to read it, so it'll be up to you to figure out how to clean it up.

Of course, sometimes you just don't want to read about that damned stylesheet any more than you have to, so...

Lazy Hacker Secret #3: Compartmentalize Repeated Code.
You'll need to learn some php, but we're talking very minimal php, and this is talking about actually coding stuff. A fun thing to understand about PHP is that it not only allows for code execution, but it also allows for object-oriented coding, even when all you're doing is regurgitating HTML. Between the choice of designing a header that has to be copy-pasted across umpteen pages versus telling each page to retrieve from "header.php", and then only having to change one file versus umpteen whenever you want to create a change . . . well, that's not just Lazy, that's downright clever.

But now we've just asked you to learn a little trick to make your life easier! That's okay, because since you're trying to be Lazy, obviously you should...

Lazy Hacker Secret #4: Only Learn What You Need Right Then.
Just because it's not the way you were taught in school doesn't mean it still won't work. When it comes to HTML, CSS, PHP, and all the other Alphabet-soup languages, you should only seek out the parts that get the job done; you'll understand those bits easier, and even if it doesn't make sense, at least you know what works. Language references are just littered across the internet, and picking up the few bits you need from each one should be easy, right?

Once you've done this much legwork, and you're still stumped, it's time to use the last Tip...

Lazy Hacker Secret #5: Know Who to Ask.
When it comes to simple HTML questions, it makes sense to ask your peers first. If you feel you need more advice, forums for programmers and books on the stuff are meant to be used. As long as you sound like you've done at least a little research, most geeks will gladly either give you the next few steps, or soundly correct you (but give you the right answer anyway).

Caveat: Make sure the question is worth their time. You don't ask Linus Torvalds what the 'ls' command is, and trying to jump the hierarchy of expertise makes you look dumber for asking and also makes it less likely others will answer.

A little effort goes a long way with a Lazy Hacker, and while it won't make you a complete programming guru, at least it'll be enough to make what you've got look worthwhile.

Labels: , ,